<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Dropzone JS</title>
    <link rel="stylesheet" href="../../assets/libs/bootstrap/dist/css/bootstrap.min.css">
    <link href="../../assets/libs/dropzone/basic.css" rel="stylesheet"/>
    <link href="../../assets/libs/dropzone/dropzone.css" rel="stylesheet"/>
    <link href="../../assets/libs/dropzone/style.css" rel="stylesheet"/>
    <link href="../../dist/css/style.css" rel="stylesheet">

    <style>
        .dropzone .dz-preview .dz-error-message{
            display: none !important;
        }
    </style>
</head>

<body>
<div class="container">
    <section>
        <h1 id="try-it-out">Try it out!</h1>
        <div class="dropzone" id="myDropzone"></div>
    </section>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
<!-- Load Dropzone JS -->
<script src="../../assets/libs/dropzone/dropzone.js"></script>
<script>
    // var myDropzone = new Dropzone("div#myDropzone", {
    //     url: "/file/post",
    //     addRemoveLinks: true,
    //     dictRemoveFile: "移除",
    //     acceptedFiles: "image/*",
    //     init: function() {
    //         // this.on("addedfile", function(file) { alert("Added file."); });
    //     }
    // });

    // Dropzone.options.myDropzone = {
    //         addRemoveLinks: true,
    //         dictRemoveFile: "移除",
    // };

    Dropzone.options.myDropzone = false;

    var myDropzone = new Dropzone("div#myDropzone", {
        url: "/file/post",
        addRemoveLinks: true,
        dictRemoveFile: "移除",
        acceptedFiles: "image/*",
        init: function() {
            this.on("addedfile", function(file) { alert("Added file."); });
        }
    });


</script>
</body>
</html>